package Model;

import java.awt.geom.Point2D;

import robocode.rescue.RobotInfo;

public class Robo {
	private Point2D position;
	private Point2D previous_pos[];
	private String comportamento;
	private RobotInfo info;
	private int Id;
	
	public Point2D getPosition() {
		return position;
	}

	public void setPosition(Point2D position) {
		this.position = position;
	}

	public Point2D[] getPrevious_pos() {
		return previous_pos;
	}

	public void setPrevious_pos(Point2D[] previous_pos) {
		this.previous_pos = previous_pos;
	}
	

	public String getComportamento() {
		return comportamento;
	}

	public void setComportamento(String comportamento) {
		this.comportamento = comportamento;
	}

	public int getId() {
		return Id;
	}

	public void setId(int id) {
		Id = id;
	}

	public RobotInfo getInfo() {
		return info;
	}
	public void updateInfo(RobotInfo info ) {
		this.info = info;		
		previous_pos[0] = previous_pos[1];
		previous_pos[1] = position;
		position = new Point2D.Double(info.getX(), info.getY());
	}

	public Robo( RobotInfo info)
	{
	//	comportamento = "ATAQUE"; 
		previous_pos = new Point2D[2];
		position = new Point2D.Double(info.getX(), info.getY());
		previous_pos[0] = position;
		previous_pos[1] = position;
		Id = info.getRobotIndex();
		this.info = info;
	}
	

}
